home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / w3 / docomp.el < prev    next >
Encoding:
Text File  |  1995-08-29  |  4.2 KB  |  109 lines

  1. (setq load-path (cons (expand-file-name "./") load-path))
  2.  
  3. (defun hack-dot-emacs ()
  4.   (interactive)
  5.   (let* ((args command-line-args-left)
  6.      (fname (expand-file-name (nth 0 args)))
  7.      (dir (nth 1 args)))
  8.     (setq command-line-args-left (cdr (cdr command-line-args-left)))
  9.     (set-buffer (get-buffer-create " *x*"))
  10.     (erase-buffer)
  11.     (if (file-exists-p fname)
  12.     (insert-file-contents fname))
  13.     (goto-char (point-min))
  14.     (if (search-forward ";;; Emacs-w3 configuration options" nil t)
  15.     (message "No changes made.")
  16.       (goto-char (point-max))
  17.       (insert "\n;;; Emacs-w3 configuration options\n")
  18.       (insert "(setq load-path (cons (expand-file-name \""
  19.           dir "\") load-path))\n")
  20.       (insert "(autoload 'w3-preview-this-buffer \"w3\" \"WWW Previewer\" t)\n")
  21.       (insert "(autoload 'w3-follow-url-at-point \"w3\" \"Find document at pt\" t)\n")
  22.       (insert "(autoload 'w3 \"w3\" \"WWW Browser\" t)\n")
  23.       (insert "(autoload 'w3-open-local \"w3\" \"Open local file for WWW browsing\" t)\n")
  24.       (insert "(autoload 'w3-fetch \"w3\" \"Open remote file for WWW browsing\" t)\n")
  25.       (insert "(autoload 'w3-use-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
  26.       (insert "(autoload 'w3-show-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
  27.       (insert "(autoload 'w3-follow-link \"w3\" \"Follow a hypertext link.\" t)\n")
  28.       (insert "(autoload 'w3-batch-fetch \"w3\" \"Batch retrieval of URLs\" t)\n")
  29.       (insert "(autoload 'url-get-url-at-point \"url\" \"Find the url under the cursor\" nil)\n")
  30.       (insert "(autoload 'url-file-attributes  \"url\" \"File attributes of a URL\" nil)\n")
  31.       (insert "(autoload 'url-popup-info \"url\" \"Get info on a URL\" t)\n")
  32.       (insert "(autoload 'url-retrieve   \"url\" \"Retrieve a URL\" nil)\n")
  33.       (insert "(autoload 'url-buffer-visiting \"url\" \"Find buffer visiting a URL.\" nil)\n")
  34.       (insert "(autoload 'gopher-dispatch-object \"gopher\" \"Fetch gopher dir\" t)\n")
  35.       (insert ";;; End of Emacs-w3 configuration options\n")
  36.       (write-file fname))))
  37.  
  38. (defun w3-declare-variables (&rest args)
  39.   (while args
  40.     (eval (list 'defvar (car args) nil ""))
  41.     (setq args (cdr args))))
  42.  
  43. ;; For Emacs 19
  44. (w3-declare-variables 'track-mouse 'menu-bar-help-menu)
  45.  
  46. ;; For Emacs 18
  47. (w3-declare-variables 'mouse-map 'x-button-middle 'x-button-c-middle)
  48.  
  49. ;; For Epoch
  50. (w3-declare-variables 'mouse-middle 'mouse-down 'buffer-style)
  51.  
  52. ;; For macintosh
  53. (w3-declare-variables 'buffers-menu)
  54.  
  55. ;; For OS/2
  56. (w3-declare-variables 'emx-binary-mode)
  57.  
  58. ;; For XEmacs/Lucid
  59. (w3-declare-variables 'current-menubar 'default-menubar 'extent
  60.               'mode-motion-hook 'mode-popup-menu 'sound-alist
  61.               'inhibit-help-echo 'default-toolbar
  62.               'bottom-toolbar-height 'top-toolbar-height
  63.               'right-toolbar-width 'left-toolbar-width
  64.               'top-toolbar 'bottom-toolbar 'right-toolbar
  65.               'left-toolbar)
  66.  
  67. ;; For MULE
  68. (w3-declare-variables '*noconv* '*autoconv* '*euc-japan* '*internal*
  69.               'file-coding-system-for-read 'file-coding-system)
  70.  
  71. ;; For Mailcrypt
  72. (w3-declare-variables 'mc-pgp-path 'mc-pgp-key-begin-line 'mc-ripem-pubkeyfile
  73.               'mc-default-scheme 'mc-flag)
  74.  
  75. ;; For NNTP
  76. (w3-declare-variables 'nntp-server-buffer 'nntp-server-process 'nntp/connection
  77.               'gnus-nntp-server 'nntp-server-name 'nntp-version
  78.               'gnus-default-nntp-server)
  79.  
  80. ;; For ps-print
  81. (w3-declare-variables 'ps-bold-faces 'ps-italic-faces 'ps-print-version)
  82.  
  83. ;; For xpm-button
  84. (w3-declare-variables 'x-library-search-path)
  85.  
  86. ;; For a few intern things
  87. (w3-declare-variables 'w3-blink-style 'w3-wired-style 'tag 'w3-working-buffer
  88.               'proxy-info)
  89.  
  90. (w3-declare-variables 'command-line-args-left 'standard-display-table)
  91.  
  92. (load "bytecomp" t t nil)
  93. ;; Emacs 19 byte compiler complains about too much stuff by default.
  94. ;; Turn off most of the warnings here.
  95. (setq byte-compile-warnings '(free-vars))
  96.  
  97. ;; Turn off dynamic docstrings and lazy function loading.  This
  98. ;; is a new feature of FSF Emacs 19.29, and is incompatible
  99. ;; with pre-19.29 versions of FSF Emacs and all version of Lucid
  100. ;; Emacs / XEmacs.
  101. (setq byte-compile-dynamic nil
  102.       byte-compile-dynamic-docstrings nil)
  103.  
  104. (require 'w3-vars)
  105. (require 'url)
  106. (require 'mm)
  107. (load-library "w3-sysdp.el")
  108. (provide 'ange-ftp)
  109.